package com.example.boot.dladvertising.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.boot.dladvertising.service.DlAdvertisingService;
import com.example.boot.util.ResultData;
import com.example.boot.util.ResultUtil;

@RestController
public class DlAdvertisingController {
	private final static Logger logger = LoggerFactory.getLogger(DlAdvertisingController.class);

	@Autowired
	private DlAdvertisingService advertisingService;
	
	/**
	 * 首页查询D
	 * @param openId
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "wechat/index")
	public ResultData<Object> wechatIndex(String openId) throws Exception {
		logger.info("openId={}|", openId);
		return ResultUtil.success(advertisingService.wechatIndex());
	}

}
